Imports BlazeApps.Library.SlideShows
Imports System.Data

Partial Class SlideShow
    Inherits System.Web.UI.Page

    <System.Web.Services.WebMethod()> _
    <System.Web.Script.Services.ScriptMethod()> _
    Public Shared Function GetSlides() As AjaxControlToolkit.Slide()

        Dim DT As New DataTable
        Dim List As New SlideShowList
        Dim DR As DataRow

        DT = List.GetSlideShow()

        Dim s(DT.Rows.Count) As AjaxControlToolkit.Slide
        Dim x As Integer = 0

        For Each DR In DT.Rows
            s(x) = New AjaxControlToolkit.Slide(String.Format("default.aspx?pid=res_thumbnail&resourceid={0}", DR.Item("resourceid")), "Image", "Image")
            x += 1
        Next

        Return s

    End Function

End Class
